
//
//  EditAddressCell.m
//  LuxuryGoods
//
//  Created by DCQ on 2018/5/25.
//  Copyright © 2018年 Future. All rights reserved.
//

#import "EditAddressCell.h"

@interface  EditAddressCell()
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UIImageView *arrowImgV;
@property (weak, nonatomic) IBOutlet UITextField *inputTF;

@end
@implementation EditAddressCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
   [self.inputTF addTarget:self action:@selector(textFieldChanged:) forControlEvents:UIControlEventEditingChanged];
}
- (void)textFieldChanged:(UITextField *)textField{
    if (self.changeBlock) {
        self.changeBlock(textField.text,self.indexPath);
    }
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setupTitle:(NSString *)title withPlaceholder:(NSString *)placeholder withContent:(NSString *)content{
    self.title.text = title;
    self.inputTF.placeholder = placeholder;
    self.inputTF.text = content; 
}

- (void)setupTFEnabled:(BOOL)enabled{
    self.arrowImgV.hidden = enabled;
    self.inputTF.enabled = enabled;
}
@end
